//
//  RGMainPageView.h
//  RedGrass
//
//  Created by wukong on 2018/11/25.
//  Copyright © 2018年 hongcaosp. All rights reserved.
//

#import "BaseView.h"


@class RGMainPageView;
@protocol RGMainPageViewDelegate <NSObject>

//加载更多

-(void) gainRecommendVideoListWithView:(RGMainPageView *)view isLoadMore:(BOOL)isLoadMore;

//分享
-(void) shareWithView:(RGMainPageView *)view selectedPath:(NSIndexPath *)path;

//评论
-(void) commentWithView:(RGMainPageView *)view selectedPath:(NSIndexPath *)path;

//关注
-(void) focusWithView:(RGMainPageView *)view selectedPath:(NSIndexPath *)path;

//喜欢
-(void) favoriteWithView:(RGMainPageView *)view selectedPath:(NSIndexPath *)path;

//点击了用户的头像
-(void)userIconClickWithCellIndex:(NSInteger)index;


//二维码
 -(void) scanQRCodeWithView:(RGMainPageView *)view;

//搜索
-(void) searchSomethingWithView:(RGMainPageView *)view;

//更新视频播放量
-(void) updateVedioPlayCountWithCellIndex:(NSInteger)index;

//cell滑动时，调整tabbar的透明度
-(void) updateTabbarUIStyleWithCellIndex:(NSInteger)index;


@optional

@end

NS_ASSUME_NONNULL_BEGIN

@interface RGMainPageView : BaseView

@property (weak, nonatomic) id <RGMainPageViewDelegate> viewDelegate;

@property (assign, nonatomic, readonly) NSInteger currentShowCellIndex;

-(instancetype) initViewWithIsShowBottomToolBar:(BOOL)isShowToolBar;

//刷新UI
-(void) reloadTableViewWithVedioList:(NSMutableArray *)vedioList;
//在制定的某一行刷新UI
-(void) reloadTableViewWithVedioList:(NSMutableArray *)vedioList chosedIndex:(NSInteger)chosedIndex;

//更多视频的时候刷新
-(void) reloadTableViewWhenHaveMoreVedioWithVedioList:(NSMutableArray *)vedioList;
//加载完成后，开始播放第一个视频
-(void) playVedioWithFirstIndexWhenLoadSuccess;
//关注动画
-(void) startFocusAnimationWithIsFocus:(BOOL) isFoucus cellIndex:(NSInteger)index;
//喜欢动画
-(void) startFavoriteAnimationWithIsFavorite:(BOOL)isFavorite cellIndex:(NSInteger)index;


//停止header刷新动画
-(void) mainPageViewMjHeaderLoadingEnd;

//停止footer刷新动画
-(void) mainPageViewMjFooterLoadingEnd;
//设置footer的状态为nomoredata
-(void) setMainPageViewMjFooterStatusWithNoMoreData;

-(void) stopPlayingWhenCurrentVCIsNoteVisiable; //当前页面不可见时暂停播放

//隐藏导航栏
-(void) hideCustomNavgationBar;

//评论成功后，更新视图里面的评论数
-(void) updateCommentCountsWhenCommentSuccessWithCellIndex:(NSInteger)cellIndex;

-(void) updateforwardCountsWhenShareSuccessWithCellIndex:(NSInteger)cellIndex;

@end

NS_ASSUME_NONNULL_END
